<?php defined('SYSPATH') OR die('No direct access allowed.') ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>网络课程后台登录</title>
<?php echo HTML::style('statics/styles/admin/commom.css') ?>
<style type="text/css">
#login { width:519px; height:288px; position:absolute; top:50%; left:50%;
         margin-left:-260px; margin-top:-200px; z-index:1;
         background-image:url(<?php echo URL::site('statics/images/admin') ?>/login_bg.jpg);}
#login_form { position:absolute; top:110px; left:220px;}
#login_form label { display:inline-block; width:60px; font-size:14px;
        color:#666; font-weight:bold;}
</style>
<?php echo HTML::script('statics/scripts/jquery-1.3.2.js') ?>
</head>

<body>

<div id="login">
    <div id="login_form">
        <form action="?post" method="post">
            <table>
                <tr>
                    <th><label for="username">用户名: </label></th>
                    <td><input type="text" class="txt" name="username" value="" id="username" /></td>
                </tr>
                <tr>
                    <th><label for="password">密　码: </label></th>
                    <td><input type="password" class="txt" name="password" value="" id="password" /></td>
                </tr>
                <tr>
                    <th><label for="password">验证码: </label></th>
                    <td>
                    	<input type="text" class="txt" name="captcha" value="" />
                    </td>
                </tr>
                <tr>
                	<th></th>
                    <td>
                    	<?php echo HTML::image('captcha', array('style' => 'cursor:pointer', 'onclick' => 'reloadCaptcha(this)'))?>
                    </td>
                </tr>
                <?php if (($error = Arr::get($_GET, 'error'))): ?>
                <tr>
                    <td>&nbsp;</td>
                    <td class="red"><?php echo htmlspecialchars($error) ?></td>
                </tr>
                <?php endif ?>
                <tr>
                    <td>&nbsp;</td>
                    <td>
                        <?php echo Form::submit(NULL, '登录', array('class' => 'btn')) ?>
                        <?php echo Form::input(NULL, '清空', array('type' => 'reset', 'class' => 'btn')) ?>
                    </td>
                </tr>
            </table>
            <script type="text/javascript">jQuery("#username").focus();</script>
        </form>
    </div>
</div>
<script type="text/javascript">
function reloadCaptcha(captcha) {
	captcha.src = '<?php echo URL::site('captcha')?>?' + Math.random();
}
</script>
</body>
</html>